const BASE_URL = "https://www.daizhongdai.xyz:3007"
function get (path,data = {},isToken = false){
  var head = {}
  var token =  wx.getStorageSync('token')
  if(isToken && (token!=undefined||token!='')){
    head.sessiontoken =token
  }
 return new Promise((resolve, reject) => {
    wx.request({
      url: BASE_URL + path, //api地址
      method: 'GET',
      data: data, 
      header: head, 
      success: resolve,
      fail: function(err) {
        reject(err)
      }
    })
  })
}

module.exports = {
  get:get
}